<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" href="css/amazeui.min.css">
		<link rel="stylesheet" href="css/admin.css">
		<link rel="stylesheet" href="css/app.css">
		<link rel="stylesheet" type="text/css" href="./js/vant-UI/index.css" />
		<script src="js/jquery-1.11.3.min.js"></script>
		<script src="./js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="./js/vant-UI/vant.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/amazeui.min.js"></script>
		<script src="js/app.js"></script>
		<script type="text/javascript" src="myplugs/js/plugs.js"></script>
		<script src="js/GeTools.js" type="text/javascript" charset="utf-8"></script>
		<style>
			.admin-main {
				padding-top: 0px;
			}
		</style>
	</head>
	<body>
		<div id="root">
			<header class="am-topbar am-topbar-inverse admin-header">
				<div class="am-topbar-brand">
					<strong>员工</strong> <small>管理系统</small>
				</div>
				<button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
					data-am-collapse="{target: '#topbar-collapse'}">
					<span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span>
				</button>
				<div class="am-collapse am-topbar-collapse" id="topbar-collapse">

					<ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
						<!-- <li>
							<a href="javascript:;"><span class="am-icon-envelope-o"></span> 收件箱 <span
									class="am-badge am-badge-warning">5</span> </a>
						</li> -->
						<li class="am-dropdown" data-am-dropdown="">
							<a class="am-dropdown-toggle" data-am-dropdown-toggle="" href="javascript:;"> <span
									class="am-icon-users"></span> admin<span class="am-icon-caret-down"></span>
							</a>
							<ul class="am-dropdown-content">
								<li onClick="updatePwd('修改密码',2)">
									<a href="javascript:void(0)"><span class="am-icon-cog"></span> 修改密码</a>
								</li>
								<li>
									<a href="account/logOut.action"><span class="am-icon-power-off"></span> 退出
									</a>
								</li>
							</ul>
						</li>
						<li class="am-dropdown" data-am-dropdown="">

						</li>
					</ul>
				</div>
			</header>

			<div class="am-cf admin-main">
				<!-- sidebar start -->
				<div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
					<div class="am-offcanvas-bar admin-offcanvas-bar">
						<ul class="am-list admin-sidebar-list">
							<li>
								<a href="admin-index.html"><span class="am-icon-home"> 首页</span>
							<li v-if="level == 0" class="admin-parent">
								<a class="am-cf"><span class="am-icon-file"></span> 人事管理<span
										class="am-icon-angle-right am-fr am-margin-right"></span> </a>
								<ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
									<li>
										<a href="depart.html" target="right" class="am-cf">
											部门管理
											<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
										</a>
									</li>
									<li>
										<a href="user.html" target="right" class="am-cf">

											用户管理
											<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
										</a>
									</li>

								</ul>
							</li>

							<!-- <li class="admin-parent">
								<a class="am-cf"><span class="am-icon-file"></span> 日程管理<span
										class="am-icon-angle-right am-fr am-margin-right"></span> </a>
								<ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
									<li>
										<a href="schedule.html" target="right" class="am-cf"><span
												class="am-icon-check"></span> 我的日程
											<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
										</a>
									</li>
			
								</ul>
							</li> -->

							<li v-if="level == 0" class="admin-parent">
								<a class="am-cf"><span class="am-icon-file"></span> 系统管理<span
										class="am-icon-angle-right am-fr am-margin-right"></span> </a>
								<ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
									<li>
										<a href="role.html" target="right" class="am-cf">
											角色管理
											<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
										</a>
									</li>

								</ul>
							</li>
							<li class="admin-parent">
								<a class="am-cf"><span class="am-icon-file"></span> 个人信息<span
										class="am-icon-angle-right am-fr am-margin-right"></span> </a>
								<!-- <ul class="am-list am-collapse admin-sidebar-sub am-in" id="collapse-nav">
									<li>
										<a href="role.html" target="right" class="am-cf">
											角色管理
											<span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
										</a>
									</li>
										
								</ul> -->
							</li>
							<li class="admin-parent">
								<a href="role.html" target="right" class="am-cf">
									<span class="am-icon-file"></span> 修改密码
									<span class="am-icon-angle-right am-fr am-margin-right"></span>
								</a>
							</li>
							<!-- <li onClick="updatePwd('修改密码',${)">
								<a href="javascript:void(0)" onClick="updatePwd('修改密码',5)">
									<span class="am-icon-sign-out"></span> 修改密码</a>
							</li> -->
							<!-- <li>
								<a href="account/logOut.action"><span class="am-icon-sign-out"></span> 注销</a>
							</li> -->
						</ul>

						<div class="am-panel am-panel-default admin-sidebar-panel" style="margin: 0px;">
							<van-calendar title="日历" :poppable="false" :show-confirm="false"
								:style="{ height: '350px' }" :show-title="false" :row-height="48" />
						</div>


					</div>
				</div>
				<!-- sidebar end -->

				<!-- content start -->
				<div class="admin-content">
					<div class="admin-content-body">
						<!-- <iframe src="depart.html" width="100%" height="1100" name="right"
							style="border: none;"></iframe> -->
					</div>
				</div>

				<!-- <footer class="admin-content-footer">
					<hr>
					<p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
				</footer> -->

			</div>
			<!-- content end -->

		</div>

		<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
			data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

		<!-- <footer>
			<hr>
			<p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
		</footer> -->
		</div>


	</body>
	<script type="text/javascript">
		var vm = new Vue({
			el: "#root",
			data: {
				level: '',
			},
			methods: {
				getUserInfo() {
					var token = localStorage.token
					if (token != '203267340') {
						alert("请登录");
						window.location.href = "login.html"
					} else {
						// alert("登陆成功")
						return
					}
				},
				islogin() {
					var token = localStorage.token
					if (token == '') {
						alert("请登录");
						window.location.href = "login.html"
					} else {
						// alert("登陆成功")
						return
					}
				}
			},
			mounted() {

				this.getUserInfo();
				var Req = GeTools.getParameter();
				var lv = GeTools.getNullValue(Req['lv'])
				if (lv == 0) {
					this.level = lv
					console.log("当前等级为超级管理员lv:" + lv)
				}
				if (lv == 1) {
					this.level = lv
					console.log("当前等级为超级管理员lv:" + lv)
				}

				function updatePwd(title, id) {
					$.jq_Panel({
						title: title,
						iframeWidth: 500,
						iframeHeight: 300,
						url: "updatePwd.html"
					});
				}
			}
		})
	</script>
</html>
